/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utilitario;

/**
 *
 * @author rodrig0
 */
public class cpf {
    public static boolean verificar(String cpf){
        int soma = 0;
        if(cpf.length() != 11){
            return false;
        }
        for (int i = 0; i < 11; i++) {
            soma = soma + Integer.parseInt(cpf.substring(i, i+1));
        }
        if(soma%11 == 0){
            return true;
        }
        
        return false;
    }
    
    public static void main(String[] args) {
        String c = "04241433130";
        System.out.println(verificar(c));
    }
}
